'use strict';

module.exports = app => {
    const {
        STRING,
        INTEGER
    } = app.Sequelize;
    const system_rule = app.model.define('system_rule',{
        id:{
            type:INTEGER,
            primaryKey:true,
            autoIncrement:true,
            allowNull:false,
            comment:"千分制规则ID"
        },
        rule_name:{
            type:STRING,
            defaultValue:null,
            comment:"规则名称"
        },
        rule_explain:{
            type:STRING,
            defaultValue:null,
            comment:"规则描述"
        },
        score:{
            type:INTEGER,
            defaultValue:null,
            comment:"分值"
        },
        rule_class:{
            type:STRING,
            defaultValue:null,
            comment:"规则类型"
        },
        valid:{
            type:STRING,
            defaultValue:"1",
            comment:"是否有效(1为有效0为无效)"
        }
    })
    system_rule.associate = function () {
        
    }
}